I was working with a couple of students on cellular automata, and
thought I'd share the file I used to create the 1-dimensional
(elementary) version (see PTSF for my code and see
http://mathworld.wolfram.com/ElementaryCellularAutomaton.html for some
explanation.
The images are nothing special, and they don't compress very well (by
their very nature), but I included 2 anyway. It is somewhat instructive
to color the cells according to the state of their neighbors. This
allows you to anticipate the next generation, and see the rule better.
I've use the convention:
rgb <state_of_left_neighbor, state_of_cell, state_of_right_neighbor>
so that any cells with green in them (green, yellow, blue-green, white)
are "alive."
Dave Matthews
Post a reply to this message
Attachments:
Download 'ca_001.jpg' (70 KB)
Download 'ca_006.jpg' (95 KB)
Preview of image 'ca_001.jpg'
Preview of image 'ca_006.jpg'
|